<?
load_model('Common');
class User extends Common {
	protected $_name ="user";
	protected $_primary = 'u_id';

	public function get_user_info($id){
		$db = $this->getAdapter();
		$where = $db->quoteInto('u_id = ?', $id);
		return $this->fetchRow($where)->toArray();
	}
	/**
	 * 根据where获取指定字段信息
	 *
	 * @param unknown_type $field
	 * @param unknown_type $where
	 * @return string/int 
	 */
	function get_user_one($field,$where){
		$db = $this->getAdapter();
		$sql = "select $field from zf_user where $where";
		return $db->fetchOne($sql);
	}
	
}

?>